class SingletonLazy1{
    private static volatile SingletonLazy1 instance = null;
    private SingletonLazy1(){}
    public static SingletonLazy1 getInstance(){
        if (instance==null){
            synchronized (SingletonLazy1.class){
                if(instance==null){
                    instance=new SingletonLazy1();
                }
            }
        }
        return instance;
    }
}
public class demo2 {

}
